<template>
  <div
    class="card-box"
    :style="'width:' + width + ';height:' + height + ';margin:' + margin"
  >
    <div class="card-title">{{ title }}</div>
    <slot></slot>
  </div>
</template>

<script>
export default {
  props: {
    width: {
      type: String,
      default: "100%",
    },
    height: {
      type: String,
    },
    title: {
      type: String,
    },
    margin: {
      type: String,
    },
  },
};
</script>

<style lang="less" scoped>
.card-box {
  background: #ffffff;
  border-radius: 10px;
  position: relative;
  display: inline-block;
  vertical-align: top;
  padding: 15px;
  .card-title {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 18px;
    font-family: "Source Han Sans CN";
    font-weight: 900;
    color: #303133;
  }
}
</style>
